home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 48 / PC Gamer IT CD 48 1-2.iso / age2 / AoE2demo.exe / 1033 / CABFILE / MSGAME.CAB / Data / gamedata.drs / Unnamed File 000021.bina < prev    next >
Text File  |  1999-10-01  |  12KB  |  571 lines

  1. (defrule
  2.     (strategic-number sn-number-explore-groups != 1)
  3. =>
  4.     (set-strategic-number sn-number-explore-groups 1)
  5. )
  6.  
  7. (defrule
  8.     (goal wall-build YES)
  9.     (wall-invisible-percentage 2 > 0)
  10.     (strategic-number sn-number-explore-groups < 2)
  11. =>
  12.     (set-strategic-number sn-number-explore-groups 2)
  13.     (set-strategic-number sn-blot-exploration-map 1)
  14. )
  15.  
  16. (defrule
  17.     (or
  18.         (and
  19.             (strategic-number sn-number-explore-groups == 1)
  20.             (unit-type-count-total scout-cavalry-line < 1)
  21.         )
  22.         (and
  23.             (strategic-number sn-number-explore-groups == 2)
  24.             (unit-type-count-total scout-cavalry-line < 2)
  25.         )
  26.     )
  27.     (can-train scout-cavalry-line)
  28. =>
  29.     (train scout-cavalry-line)
  30. )
  31.  
  32. ;*************************
  33. ;set goal 3
  34. (defrule
  35.     (not (goal military-parity YES) )
  36. =>
  37.     (set-goal military-parity YES)
  38. )
  39.  
  40. (defrule
  41.     (or
  42.         (or
  43.             (and
  44.                 (players-military-population any-enemy > 50)
  45.                 (military-population < 45)
  46.             )
  47.             (and
  48.                 (players-military-population any-enemy > 40)
  49.                 (military-population < 35)
  50.             )
  51.         )
  52.         (and
  53.             (players-military-population any-enemy > 30)
  54.             (military-population < 25)
  55.         )
  56.     )
  57. =>
  58.     (set-goal military-parity NO)
  59. )
  60.  
  61. (defrule
  62.     (or
  63.         (or
  64.             (and
  65.                 (players-military-population any-enemy > 20)
  66.                 (military-population < 15)
  67.             )
  68.             (and
  69.                 (players-military-population any-enemy > 10)
  70.                 (military-population < 5)
  71.             )
  72.         )
  73.         (and
  74.             (players-military-population any-enemy > 0)
  75.             (military-population == 0)
  76.         )
  77.     )
  78. =>
  79.     (set-goal military-parity NO)
  80. )
  81.  
  82. (defrule
  83.     (or
  84.         (or
  85.             (and
  86.                 (players-military-population every-enemy < 30)
  87.                 (military-population > 60)
  88.             )
  89.             (and
  90.                 (players-military-population every-enemy < 25)
  91.                 (military-population > 50)
  92.             )
  93.         )
  94.         (and
  95.             (players-military-population every-enemy < 20)
  96.             (military-population > 40)
  97.         )
  98.     )
  99. =>
  100.     (set-goal military-parity SUPERIOR)
  101. )
  102.  
  103. (defrule
  104.     (or
  105.         (or
  106.             (and
  107.                 (players-military-population every-enemy < 15)
  108.                 (military-population > 30)
  109.             )
  110.             (and
  111.                 (players-military-population every-enemy < 10)
  112.                 (military-population > 20)
  113.             )
  114.         )
  115.         (and
  116.             (players-military-population every-enemy == 0)
  117.             (military-population > 4)
  118.         )
  119.     )
  120. =>
  121.     (set-goal military-parity SUPERIOR)
  122. )
  123. ;enemy army size
  124. (defrule
  125.     (players-military-population any-enemy == 0)
  126.     (players-building-type-count any-enemy watch-tower-line == 0)
  127.     (players-building-type-count any-enemy castle == 0)
  128.     (players-building-type-count any-enemy town-center <= 1)
  129.     (not (goal enemy-soldiers 0) )
  130. =>
  131.     (set-goal enemy-soldiers 0)
  132. )
  133.  
  134. (defrule
  135.     (or
  136.         (players-military-population any-enemy > 0)
  137.         (players-building-type-count any-enemy watch-tower-line > 0)
  138.     )
  139.     (not (goal enemy-soldiers 10) )
  140. =>
  141.     (set-goal enemy-soldiers 10)
  142. )
  143.  
  144. (defrule
  145.     (or
  146.         (or
  147.             (players-military-population any-enemy > 10)
  148.             (players-building-type-count any-enemy watch-tower-line > 2)
  149.         )
  150.         (or
  151.             (players-building-type-count any-enemy castle > 0)
  152.             (players-building-type-count any-enemy town-center > 1)
  153.         )
  154.     )
  155.     (not (goal enemy-soldiers 20) )
  156. =>
  157.     (set-goal enemy-soldiers 20)
  158. )
  159.  
  160. (defrule
  161.     (or
  162.         (or
  163.             (players-military-population any-enemy > 20)
  164.             (players-building-type-count any-enemy watch-tower-line > 4)
  165.         )
  166.         (or
  167.             (players-building-type-count any-enemy castle > 1)
  168.             (players-building-type-count any-enemy town-center > 2)
  169.         )
  170.     )
  171.     (not (goal enemy-soldiers 30) )
  172. =>
  173.     (set-goal enemy-soldiers 30)
  174. )
  175.  
  176. ;enemy navy size
  177. (defrule
  178.     (difficulty < easy)
  179.     (goal 2 2)
  180.     (not (goal 35 0) )
  181. =>
  182.     (set-goal 35 0)
  183. )
  184.  
  185. (defrule
  186.     (difficulty < easy)
  187.     (or
  188.         (or
  189.             (cc-players-unit-type-count every-enemy galley-line >= 2)
  190.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 2)
  191.         )
  192.         (or
  193.             (cc-players-unit-type-count every-enemy fire-ship-line >= 2)
  194.             (cc-players-unit-type-count every-enemy longboat-line >= 2)
  195.         )
  196.     )
  197.     (not (goal 35 6) )
  198. =>
  199.     (set-goal 35 6)
  200. )
  201.  
  202. (defrule
  203.     (difficulty < easy)
  204.     (or
  205.         (or
  206.             (cc-players-unit-type-count every-enemy galley-line >= 6)
  207.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 6)
  208.         )
  209.         (or
  210.             (cc-players-unit-type-count every-enemy fire-ship-line >= 6)
  211.             (cc-players-unit-type-count every-enemy longboat-line >= 6)
  212.         )
  213.     )
  214.     (not (goal 35 12) )
  215. =>
  216.     (set-goal 35 12)
  217. )
  218.  
  219. (defrule
  220.     (difficulty < easy)
  221.     (or
  222.         (or
  223.             (cc-players-unit-type-count every-enemy galley-line >= 12)
  224.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 12)
  225.         )
  226.         (or
  227.             (cc-players-unit-type-count every-enemy fire-ship-line >= 12)
  228.             (cc-players-unit-type-count every-enemy longboat-line >= 12)
  229.         )
  230.     )
  231.     (not (goal 35 18) )
  232. =>
  233.     (set-goal 35 18)
  234. )
  235. ;***************************
  236. ;see if we ought to attack!
  237. (defrule
  238.     (timer-triggered t-attackgroup)
  239. =>
  240.     (set-goal attack-control YES)
  241.     (set-strategic-number sn-percent-attack-soldiers 100)
  242.     (set-strategic-number sn-percent-attack-boats 0)
  243. )
  244.  
  245. (defrule
  246.     (timer-triggered t-attackgroup)
  247.     (nor
  248.         (stance-toward any-computer enemy)
  249.         (stance-toward any-human enemy)
  250.     )
  251. =>
  252.     (set-goal attack-control NO)
  253. )
  254.  
  255. (defrule
  256.     (timer-triggered t-attackgroup)
  257.     (building-type-count-total wonder > 0)
  258. =>
  259.     (set-goal attack-control NO)
  260. )
  261.  
  262. (defrule
  263.     (timer-triggered t-attackgroup)
  264.     (goal siege-available NO)
  265. =>
  266.     (set-goal attack-control NO)
  267. )
  268.  
  269. (defrule
  270.     (timer-triggered t-attackgroup)
  271.     (town-under-attack)
  272. =>
  273.     (chat-to-player-using-id every-ally 22406)    ;201
  274.     (chat-to-player-using-id any-human-ally 22115)
  275.         ;"Help! The enemy is in my town!"
  276. )
  277.  
  278. #load-if-defined DIFFICULTY-EASIEST
  279.     (defrule
  280.         (timer-triggered t-attackgroup)
  281.     =>
  282.         (set-strategic-number sn-percent-attack-soldiers 1)
  283.         (set-strategic-number sn-percent-attack-boats 1)
  284.         (attack-now)
  285.         (chat-local-to-self "attack now!")
  286.         (set-goal attack-control NO)
  287.     )
  288.  
  289.     #else
  290.     ;*************************
  291.     (defrule
  292.         (timer-triggered t-attackgroup)
  293.         (taunt-detected any-ally 201)
  294.         (defend-soldier-count >= ten-percent-pop)
  295.     =>
  296.         (acknowledge-taunt this-any-ally 201)
  297.         (attack-now)
  298.         (chat-local-to-self "attack now!")
  299.         (set-goal attack-control NO)
  300.     )
  301.  
  302.     (defrule
  303.         (timer-triggered t-attackgroup)
  304.         (population >= pop-cap)
  305.     =>
  306.         (set-strategic-number sn-percent-attack-soldiers 75)
  307.         (set-strategic-number sn-percent-attack-boats 75)
  308.         (attack-now)
  309.         (chat-local-to-self "attack now!")
  310.         (set-goal attack-control NO)
  311.     )
  312.  
  313.     (defrule
  314.         (goal attack-control YES)
  315.         (timer-triggered t-attackgroup)
  316.         (defend-soldier-count >= fifteen-percent-pop)
  317.         (or
  318.             (players-building-type-count any-enemy wonder > 0)
  319.             (or
  320.                 (enemy-captured-relics)
  321.                 (goal military-parity SUPERIOR)
  322.             )
  323.         )
  324.     =>
  325.         (set-strategic-number sn-percent-attack-soldiers 100)
  326.         (set-strategic-number sn-percent-attack-boats 0)
  327.         (attack-now)
  328.         (chat-local-to-self "attack now!")
  329.         (chat-to-player-using-id every-ally 22406)    ;201
  330.         (chat-to-player-using-id any-human-ally 22117)
  331.             ;"Attack now!"
  332.         (set-goal attack-control NO)
  333.     )
  334.  
  335.     (defrule
  336.         (goal attack-control YES)
  337.         (goal rush-control RUSHING)
  338.         (timer-triggered t-attackgroup)
  339.         (defend-soldier-count >= 5)
  340.         (or
  341.             (goal enemy-soldiers 0)
  342.             (goal enemy-soldiers 10)
  343.         )
  344.     =>
  345.         (attack-now)
  346.         (chat-local-to-self "attack now!")
  347.         (chat-to-player-using-id every-ally 22406)    ;201
  348.         (chat-to-player-using-id any-human-ally 22116)
  349.             ;"Everyone attack now!"
  350.         (set-goal attack-control NO)
  351.     )
  352.  
  353.     (defrule
  354.         (goal attack-control YES)
  355.         (goal rush-control RUSHING)
  356.         (timer-triggered t-attackgroup)
  357.         (or
  358.             (and
  359.                 (goal enemy-soldiers 20)
  360.                 (defend-soldier-count >= 10)
  361.             )
  362.             (and
  363.                 (goal enemy-soldiers 30)
  364.                 (defend-soldier-count >= 15)
  365.             )
  366.         )
  367.     =>
  368.         (attack-now)
  369.         (chat-local-to-self "attack now!")
  370.         (chat-to-player-using-id every-ally 22406)    ;201
  371.         (chat-to-player-using-id any-human-ally 22116)
  372.             ;"Everyone attack now!"
  373.         (set-goal attack-control NO)
  374.     )
  375.  
  376.     (defrule
  377.         (goal attack-control YES)
  378.         (timer-triggered t-attackgroup)
  379.         (defend-soldier-count >= 10)
  380.         (or
  381.             (goal enemy-soldiers 0)
  382.             (goal enemy-soldiers 10)
  383.         )
  384.     =>
  385.         (attack-now)
  386.         (chat-local-to-self "attack now!")
  387.         (chat-to-player-using-id every-ally 22406)    ;201
  388.         (chat-to-player-using-id any-human-ally 22116)
  389.             ;"Everyone attack now!"
  390.         (set-goal attack-control NO)
  391.     )
  392.  
  393.     (defrule
  394.         (goal attack-control YES)
  395.         (timer-triggered t-attackgroup)
  396.         (or
  397.             (and
  398.                 (goal enemy-soldiers 20)
  399.                 (defend-soldier-count >= 20)
  400.             )
  401.             (and
  402.                 (goal enemy-soldiers 30)
  403.                 (defend-soldier-count >= 30)
  404.             )
  405.         )
  406.     =>
  407.         (attack-now)
  408.         (chat-local-to-self "attack now!")
  409.         (chat-to-player-using-id every-ally 22406)    ;201
  410.         (chat-to-player-using-id any-human-ally 22116)
  411.             ;"Everyone attack now!"
  412.         (set-goal attack-control NO)
  413.     )
  414.  
  415.     (defrule
  416.         (difficulty < easy)
  417.         (timer-triggered t-attackgroup)
  418.         (or
  419.             (and
  420.                 (goal 35 0)
  421.                 (defend-warboat-count > 1)
  422.             )
  423.             (and
  424.                 (goal 35 6)
  425.                 (defend-warboat-count >= 4)
  426.             )
  427.         )            
  428.     =>
  429.         (set-strategic-number sn-percent-attack-soldiers 0)
  430.         (set-strategic-number sn-percent-attack-boats 100)
  431.         (attack-now)
  432.         (chat-local-to-self "boats attack now!")
  433.     )
  434.  
  435.     (defrule
  436.         (difficulty < easy)
  437.         (timer-triggered t-attackgroup)
  438.         (or
  439.             (and
  440.                 (goal 35 12)
  441.                 (defend-warboat-count >= 8)
  442.             )
  443.             (and
  444.                 (goal 35 18)
  445.                 (defend-warboat-count >= 12)
  446.             )
  447.         )            
  448.     =>
  449.         (set-strategic-number sn-percent-attack-soldiers 0)
  450.         (set-strategic-number sn-percent-attack-boats 100)
  451.         (attack-now)
  452.         (chat-local-to-self "boats attack now!")
  453.     )
  454.  
  455.     ;desperation
  456.     (defrule
  457.         (timer-triggered t-attackgroup)
  458.         (game-time > 600)
  459.         (building-type-count wonder < 1)
  460.         (unit-type-count-total villager == 0)
  461.     =>
  462.         (set-strategic-number sn-percent-attack-soldiers 100)
  463.         (set-strategic-number sn-percent-attack-boats 100)
  464.         (attack-now)
  465.         (chat-local-to-self "everyone attack now!")
  466.     )
  467. #end-if
  468. ;********************************
  469. #load-if-defined DIFFICULTY-EASIEST
  470. ;attack timer - after 1/2 hour, launch attacks every 15 minutes
  471.     (defrule
  472.         (players-current-age every-human >= castle-age)
  473.         (game-time > 1800)
  474.     =>
  475.         (enable-timer t-attackgroup 1)
  476.         (disable-self)
  477.     )
  478.  
  479.     (defrule
  480.         (timer-triggered t-attackgroup)
  481.     =>
  482.         (disable-timer t-attackgroup)
  483.         (enable-timer t-attackgroup 900)
  484.     )
  485. #end-if
  486.  
  487. ;********************************
  488. #load-if-defined DIFFICULTY-EASY
  489. ;attack timer - after 20 minutes, launch attacks every 10 minutes
  490.     (defrule
  491.         (players-current-age every-human >= castle-age)
  492.         (game-time > 1200)
  493.     =>
  494.         (enable-timer t-attackgroup 1)
  495.         (disable-self)
  496.     )
  497.  
  498.     (defrule
  499.         (timer-triggered t-attackgroup)
  500.     =>
  501.         (disable-timer t-attackgroup)
  502.         (enable-timer t-attackgroup 600)
  503.     )
  504. #end-if
  505.  
  506. ;********************************
  507. #load-if-defined DIFFICULTY-MODERATE
  508. ;attack timer - once in feudal, or if rushing, launch attacks every 5 minutes
  509.     (defrule
  510.         (or
  511.             (current-age >= castle-age)
  512.             (goal rush-control RUSHING)
  513.         )
  514.     =>
  515.         (enable-timer t-attackgroup 1)
  516.         (disable-self)
  517.     )
  518.  
  519.     (defrule
  520.         (timer-triggered t-attackgroup)
  521.     =>
  522.         (disable-timer t-attackgroup)
  523.         (enable-timer t-attackgroup 300)
  524.     )
  525.  
  526. #end-if
  527.  
  528. ;********************************
  529. #load-if-defined DIFFICULTY-HARD
  530.     (defrule
  531.         (or
  532.             (current-age >= feudal-age)
  533.             (goal rush-control RUSHING)
  534.         )
  535.     =>
  536.         (enable-timer t-attackgroup 1)
  537.         (disable-self)
  538.     )
  539.  
  540.     (defrule
  541.         (timer-triggered t-attackgroup)
  542.     =>
  543.         (disable-timer t-attackgroup)
  544.         (enable-timer t-attackgroup 120)
  545.     )
  546.  
  547. #end-if
  548.  
  549. ;********************************
  550. #load-if-defined DIFFICULTY-HARDEST
  551.     (defrule
  552.         (or
  553.             (current-age >= feudal-age)
  554.             (goal rush-control RUSHING)
  555.         )
  556.     =>
  557.         (enable-timer t-attackgroup 1)
  558.         (disable-self)
  559.     )
  560.  
  561.     (defrule
  562.         (timer-triggered t-attackgroup)
  563.     =>
  564.         (disable-timer t-attackgroup)
  565.         (enable-timer t-attackgroup 120)
  566.     )
  567.  
  568. #end-if
  569.  
  570.  
  571.